CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

SET( CMAKE_CXX_COMPILER "arm-none-linux-gnueabi-g++" )
SET( LDFLAGS "-L/usr/local/arm/arm-none-linux-gnueabi/lib" )
SET( CPPFLAGS "-I/usr/local/arm/arm-none-linux-gnueabi/include" )
SET( PROJECT_NAME Camculator )

PROJECT( ${PROJECT_NAME} )

IF( ${BUILD} MATCHES "release" )
	SET( CMAKE_BUILD_TYPE Release )
ELSE( ${BUILD} MATCHES "release" )
	SET( BUILD "debug" )
	SET( CMAKE_BUILD_TYPE Debug )
ENDIF( ${BUILD} MATCHES "release" )

SET( PROJECT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )
SET( CURRENT_DIRECTORY "." )
SET( TINYXML_DIRECTORY "${CURRENT_DIRECTORY}/tinyxml" )

LINK_LIBRARIES( pthread png jpeg )
AUX_SOURCE_DIRECTORY( ${CURRENT_DIRECTORY} SRC )
AUX_SOURCE_DIRECTORY( ${TINYXML_DIRECTORY} TINYXML_SRC )
ADD_EXECUTABLE( ${PROJECT_NAME} ${SRC} ${TINYXML_SRC} )
